package cn.sanshuilin.kst.system.provider.bean;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author greenlee
 * @version v1.0
 * @create 创建时间: 2017-12-03 18:00
 * Copyright 2017  by 三水林科技有限公司
 **/
@Entity
@Table(name = "Clang")
public class Clang implements Serializable {
    private int id;
    private String code;
    private String language;

    @Id
    @Column(name = "ID", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "Code", nullable = true, length = 255)
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "language", nullable = true, length = 255)
    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Clang clangbean = (Clang) o;

        if (id != clangbean.id) return false;
        if (code != null ? !code.equals(clangbean.code) : clangbean.code != null) return false;
        if (language != null ? !language.equals(clangbean.language) : clangbean.language != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (language != null ? language.hashCode() : 0);
        return result;
    }
}
